]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[AppWell] Enable lightboxing immediately on popup
authorColin Walters <walters@verbum.org>
Tue, 8 Sep 2009 22:34:04 +0000 (18:34 -0400)
committerColin Walters <walters@verbum.org>
Wed, 9 Sep 2009 15:40:09 +0000 (11:40 -0400)
Rather than starting lightboxing only when the mouse enters the
menu, start it when an application filter is set.

Also delete a stale function in WindowClone from previous work.

http://bugzilla.gnome.org/show_bug.cgi?id=594555

js/ui/appDisplay.js
js/ui/overview.js
js/ui/workspaces.js

index e806f61b8063740d19842d9fdd1c1cce5f9662d7..8af04a81bdeaa6bcd53733590698a2cc44a55d7e 100644 (file)
@@ -791,7 +791,7 @@ RunningWellItem.prototype = {
                     id = this.appInfo.get_id();
                 else
                     id = null;
-                Main.overview.setWindowApplicationFilter(id);
+                Main.overview.beginApplicationWindowSelection(id);
             }));
         }
 
index 3100893bcfa17434b1b372871616e1bd7082537b..1747da276a0f8c78ed4f6ed5cf1fe7f7d4f55ba6 100644 (file)
@@ -397,16 +397,18 @@ Overview.prototype = {
             this._workspaces.setHighlightWindow(metaWindow);
     },
 
+
     /**
-     * setWindowApplicationFilter:
-     * @id: A string application identifier
+     * beginApplicationWindowSelection:
+     * @appid: Application identifier string
      *
-     * Hide all windows which are not owned by the application
-     * identified by @id.
+     * Enter a mode which shows only the widnows owned by the
+     * given application, and allow highlighting of a specific
+     * window with setHighlightWindow().
      */
-    setWindowApplicationFilter: function (id) {
+    beginApplicationWindowSelection: function (appid) {
         if (this._workspaces)
-            this._workspaces.setWindowApplicationFilter(id);
+            this._workspaces.beginApplicationWindowSelection(appid);
     },
 
     //// Private methods ////
index 07a7fc73081499763949c38ff4a5cb82ef3c6948..a7707472ad65fd2304fef15b0aaaf958cef57f3c 100644 (file)
@@ -130,17 +130,6 @@ WindowClone.prototype = {
         this._inDrag = false;
     },
 
-    setHighlighted: function (highlighted) {
-        let factor = 0.1;
-        if (highlighted) {
-            this.actor.scale_x += factor;
-            this.actor.scale_y += factor;
-        } else {
-            this.actor.scale_x -= factor;
-            this.actor.scale_y -= factor;
-        }
-    },
-
     setVisibleWithChrome: function(visible) {
         if (visible) {
             this.actor.show();
@@ -568,11 +557,19 @@ Workspace.prototype = {
         this.positionWindows(false);
     },
 
+    /**
+     * setLightboxMode:
+     * @showLightbox: If true, dim background and allow highlighting a specific window
+     *
+     * This function also resets the highlighted window state.
+     */
     setLightboxMode: function (showLightbox) {
-        if (showLightbox)
+        if (showLightbox) {
+            this.setHighlightWindow(null);
             this._lightbox.show();
-        else
+        } else {
             this._lightbox.hide();
+        }
     },
 
     setHighlightWindow: function (metaWindow) {
@@ -1153,7 +1150,6 @@ Workspaces.prototype = {
         // highlighted window while trying to handle the window or workspace possibly
         // going away.
         for (let i = 0; i < this._workspaces.length; i++) {
-            this._workspaces[i].setLightboxMode(metaWindow != null);
             this._workspaces[i].setHighlightWindow(null);
         }
         if (metaWindow != null) {
@@ -1162,7 +1158,7 @@ Workspaces.prototype = {
         }
     },
 
-    setWindowApplicationFilter: function (appId) {
+    beginApplicationWindowSelection: function (appId) {
         let appSys = Shell.AppMonitor.get_default();
 
         let showOnlyWindows;
@@ -1177,6 +1173,7 @@ Workspaces.prototype = {
         }
         this._appIdFilter = appId;
         for (let i = 0; i < this._workspaces.length; i++) {
+            this._workspaces[i].setLightboxMode(showOnlyWindows != null);
             this._workspaces[i].setShowOnlyWindows(showOnlyWindows);
         }
     },